import { createI18n } from 'vue-i18n';

import en from '@/locales/en.json';
import zh from '@/locales/zh.json';

let language = localStorage.getItem('language') ? localStorage.getItem('language'): 'zh'
const i18n = createI18n({
  locale: language,
  fallbackLocale: 'zh',
  messages: {
    en,
    zh
  }
});

export default i18n;
